<template>
  <!--会签管理-我的提交列表-付款申请详情弹窗-->
  <j-modal :title="title" :width="width" :visible="visible" switchFullscreen @ok="privacyDialogShow=true"
    @cancel="handleCancel" :cancelButtonProps="{ class:{'jee-hidden': disableSubmit1} }"
    :okButtonProps="{ class:{'jee-hidden': disableSubmit1} }" okText="提交">
    <!-- <a-popconfirm confirmText="确定"
        cancelText="取消"
        @cancel="cancelPrivacy"
        @confirm="confirmPrivacy" :disabled="privacyDialogShow"  title="确定提交吗？" >

    </a-popconfirm> -->
    <wt-fukuanxiang-form ref="realForm" :id="id" :disabled="disableSubmit"></wt-fukuanxiang-form>
  </j-modal>
</template>
<script>
  import WtFukuanxiangForm from './WtFukuanxiangForm'
  import {
    stringify
  } from 'json5'
  export default {
    name: 'WtShenpiModal',
    components: {
      WtFukuanxiangForm
    },
    props: {
      // id:{
      //   type:stringify,
      //   default:''
      // }
    },
    data() {
      return {
        title: '',
        width: 1000,
        visible: false,
        disableSubmit: false,
        disableSubmit1: true,
        privacyDialogShow: false,
      }
    },
    methods: {
      confirmPrivacy() {
        // console.log('同意了用户协议')
        // console.log(this.privacyDialogShow)l
        this.privacyDialogShow = false
        // console.log(this.privacyDialogShow)

      },
      cancelPrivacy() {
        // console.log('拒绝了用户协议')
        this.privacyDialogShow = false
      },
      add() {
        this.visible = true
        this.$nextTick(() => {
          this.$refs.realForm.add();
        })
      },
      edit(record) {
        this.visible = true
        // console.log('grfew',record);
        this.$nextTick(() => {
          this.$refs.realForm.edit(record);
          this.disableSubmit = true;
        })
      },
      close() {
        this.$emit('close');
        this.visible = false;
      },
      handleOk() {
        // this.$refs.cexiao.edit()
      },
      submitCallback() {
        this.close()

      },
      handleCancel() {
        this.close()
      }
    }
  }
</script>